/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef USB_CONNECTION_NOTIFIER_H
#define USB_CONNECTION_NOTIFIER_H
#include <optional>
#include <string>
#include "usb_device.h"
#include "pixel_map.h"
#include "notification_helper.h"
#include "notification_content.h"
#include "notification_request.h"

namespace OHOS {
namespace USB {


const std::string USB_FUNC_CHARGE = "USB_func_charge";
const std::string USB_FUNC_MTP = "USB_func_mtp";
const std::string USB_FUNC_PTP = "USB_func_ptp";

class UsbConnectionNotifier {
public:
    static std::shared_ptr<UsbConnectionNotifier> GetInstance();
    ~UsbConnectionNotifier();
    void SendNotification(std::string func);
    void CancelNotification();

    std::unordered_map<std::string, std::string> notifierMap = {
        {USB_FUNC_CHARGE, ""},
        {USB_FUNC_MTP, ""},
        {USB_FUNC_PTP, ""}
    };

private:
    UsbConnectionNotifier();
    void SetWantAgent(OHOS::Notification::NotificationRequest &request);
    void GetHapString();

    static std::shared_ptr<UsbConnectionNotifier> instance_;
    OHOS::Notification::NotificationRequest request_;
};
} // namespace USB
} // namespace OHOS
#endif // USB_CONNECTION_NOTIFIER_H
